package com.wxcms.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.wxcms.domain.DepEquipments;
import com.wxcms.domain.Equipment;

import me.chanjar.weixin.cp.bean.WxCpDepart; 

public interface WxCpDepartDao {
	/**
	 * 保存部门
	 * */
	public void addDeparts(@Param("list") List<WxCpDepart> list,@Param("_corpid")String corpid);
	/**
	 * 读取所有部门
	 * @param corpid 
	 * */
    public List<WxCpDepart> getDeparts(@Param("ids") String ids, @Param("_corpid") String corpid);
    /**
     * 清空部门表
     * */
    public void clear();
    
    public void clearByCorpId(@Param("_corpid")String corpid);
    
    public String getDepIds(@Param("id")String id,@Param("_corpid")String corpid);
//    /**
//	 * 根据部门id读取部门
//	 * */
//    public WxCpDepart CheckDepart(String depid) ;
    
    public void addEquipments(@Param("list")List<DepEquipments> list, @Param("_corpid") String corpid);
    
    
    //更新 设备扩展配置数据 
    public void  updateDetail(List<DepEquipments> list);
    /**
     * 按照微信用户读取详细列表
     * 
     * */
    public  List<DepEquipments> getEquipments(@Param("_depid")String depid,@Param("_corpid") String corpid);
    /**
     * 按照视频用户读取详细列表  id 视频用户id
     * 
     * depid  微信用户组depid
     * 
     * */
    public  List<DepEquipments> getEqpDetail(@Param("uid")String uid,@Param("depids")String depid);
    
    public  List<DepEquipments> getdEqpDetail(@Param("_depids")String depid,@Param("_corpid")String corpid);
    
    public void deletebydepid(@Param("_depid")String depid, @Param("_corpid") String _corpid);
    
    /**
     * 读取部门名称
     * */
    public String getdepname   (@Param("depid")String depid); 
    /**
     * 按成员部门id ，id可以是逗号分割  2,3 等 ，读取设备的 id 名称
     * */ 
    public  List<DepEquipments> getequips   (@Param("depid")String depid);
    
    
    public void updateName(@Param("name") String name);
 
}
